package com.example.teesystem.entity.vo.assistant;

import com.example.teesystem.common.valid.ValidErrorMessage;
import com.example.teesystem.common.valid.ValidId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class AssistantUploadVo {
    /**
     * 课程id
     */
    @ValidId(message = ValidErrorMessage.COURSE_ID_VALID_FAIL,ifCourseId = true)
    private Integer courseId;

    /**
     * 助教id
     * 待修改
     */
    @ValidId(message = ValidErrorMessage.USER_ID_VALID_FAIL,ifUserId = true)
    private Integer assistantId;

    /**
     * 助教权限
     */
    @Min(value = 0, message = ValidErrorMessage.ASSISTANT_PERMISSION_VALID_FAIL)
    @NotNull(message = "权限值不能为空")
    private long permission;

    public AssistantUploadVo(Integer courseId, Integer assistantId){
        this.courseId = courseId;
        this.assistantId = assistantId;
    }

}
